<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<form:form commandName="cityAssessmentFilter" cssClass="form-horizontal"
	role="form" onsubmit="return false;">

	<div class="form-group">
		<label class="col-sm-1 control-label no-padding-right"
			   for="county">县区</label>
		<div class="col-sm-5">
			<input type="text" name="county" id="county"
				   placeholder="请输入县区" value="${cityAssessmentFilter.county}"
				   class="form-control required">
		</div>

		<label class="col-sm-1 control-label no-padding-right"
			   for="point">分数</label>
		<div class="col-sm-5">
			<input type="text" name="point" id="point"
				   placeholder="请输入分数" value="${cityAssessmentFilter.point}"
				   class="form-control required">
		</div>
	</div>

	<form:hidden path="sysId" />
</form:form>
<script src="<s:url value="/assets/js/chosen.jquery.js"></s:url>"></script>
<script src="<s:url value="/assets/js/ajaxfileupload.js"></s:url>"></script>
<script src="<s:url value="/assets/js/jquery-ui.js"></s:url>"></script>

<script type="text/javascript">

	$("#dialog").hide();
	$("#btn").click(function() {
		var fileval = $("#fileupload").val();
		if (fileval == null || fileval == "") {
			alert("未选择任何文件");
			return;
		}

		$("#dialog").show();
		$("#dialog").dialog();
		$.ajaxFileUpload({
			type : "post",
			fileElementId : "fileupload",
			secureuri : false,
			dataType : 'json',
			url : "/pictureUpload/uploadBatch",
			async : false,
			success : function(data) {
				var val = data.data.sysid;
				console.log(val);
				$("#taxproof").attr("value", val);
				$("#dialog").dialog("close");
				alert("成功");
			},
			error : function(data) {
				$("#dialog").dialog("close");
				alert("佐证材料上传失败 ！！请联系管理员");
			}

		});

	});
	var isauditval = $("#isaudit").val();
	console.log(isauditval);
	if(isauditval=='1'){
		$("#updatebtn").attr("disabled", true);
		console.log(isauditval+"111");
	}
	
	function findtwoClass() {
		var teamID = $("#teamClassId").val();
		var teamClassname = $("#teamClassId").find("option:selected").text();
		$("#teamClass").attr("value",teamClassname);
        //console.log(teamID);
		//alert(teamID);
		var teamcla = {
			"teamId" : teamID
		};

//		$.ajax({
//			url : "/chart/show/getTeamclassNames",
//			dataType : "json", //返回数据形式为json
//			type : "POST",
//			contentType : 'application/json;charset=UTF-8',
//			data : JSON.stringify(teamcla),
//			success : function(data) {
//				$("#teamname option").remove();
//				$("#teamname").append(" <option value='00'>请选择</option>");
//				for (var i = 0; i < data.data.length; i++) {
//					var teamid = data.data[i].teamId;
//					var teamname = data.data[i].teamName;
//					$("#teamname").append(
//							"<option value='"+teamname+"'>" + teamname
//									+ "</option>");
//					//console.log(teamname);
//				}
//			}
//		});

	}
</script>
